Skip to content

[3.14] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)#153025

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-ed370d3-3.14
Jul 4, 2026
Merged

[3.14] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)#153025
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-ed370d3-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

An abruptly closed empty comment ("" or "") no longer extends
up to a later "-->" in the same feed() call.

test_htmlparser now also feeds each string source as a single chunk, in
addition to one character at a time, to exercise different input buffering.
(cherry picked from commit ed370d3)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…ythonGH-153007)

An abruptly closed empty comment ("<!-->" or "<!--->") no longer extends
up to a later "-->" in the same feed() call.

test_htmlparser now also feeds each string source as a single chunk, in
addition to one character at a time, to exercise different input buffering.
(cherry picked from commit ed370d3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the type-security A security issue label Jul 4, 2026
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 4, 2026 12:07
@serhiy-storchaka serhiy-storchaka merged commit c3c710f into python:3.14 Jul 4, 2026
51 of 54 checks passed
@miss-islington miss-islington deleted the backport-ed370d3-3.14 branch July 4, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants